#pragma once

#include <WinSock2.h>
#include "SOCK_Stream.h"
#include "SOCK_Acceptor.h"

#define MAX_HANDLES 128

namespace Network
{
	typedef unsigned int EventType;

	enum {
		READ_EVENT    =  1, ///Read event == Accept
		ACCEPT_EVENT  =  1, ///Accept event
		WRITE_EVENT   =  2, ///Write event
		TIMEOUT_EVENT =  4, ///Timeout event 
		CLOSE_EVENT   =  8, ///Close event
	};

	class EventHandler {
	public:
		EventHandler(void);
		virtual ~EventHandler(void);
		virtual void HandleEvent(HANDLE handle, EventType et ) = 0;
		virtual HANDLE GetHandle(void);
		virtual void SetHandle(HANDLE handle);
		//virtual EventType getType(void) { return EVENT_NONE; }
	private:
		HANDLE handle;
	};
}






